package com.shy.configs.converts;


import com.shy.collect.entity.UserInfo;
import com.shy.configs.mvc.models.vo.LikeUserInfoVo;
import com.shy.configs.mvc.models.vo.UserInfoVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.MappingConstants;
import org.mapstruct.Mappings;

import java.util.List;


@Mapper(componentModel = MappingConstants.ComponentModel.SPRING, uses = {ConvertHelper.class})
public interface UserInfoConvert {

    List<UserInfoVo> convertListUserInfoVo(List<UserInfo> userInfoList);



    @Mappings({
            @Mapping(source = "createTime", target = "createTime", dateFormat = "yyyy-MM-dd HH:mm:ss"),
            @Mapping(source = "status", target = "status", qualifiedByName = "transStatus")
    })
    UserInfoVo mapUserInfoVo(UserInfo userInfo);

    List<LikeUserInfoVo> convertLikeUserInfoVoList(List<UserInfo> userInfoList);

    LikeUserInfoVo mapLikeUserInfoVo(UserInfo userInfo);
}
